<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <link rel="stylesheet" href="../styles/taobao.css">
  <link rel="stylesheet" href="../styles/shop.css">
  <link rel="Shortcut Icon" href="/front/favicon.ico">
  <link rel="stylesheet" href="/front/plugins/element-ui/index.css">
</head>
<body>
<div class="member-ft" style="background-color:#fff;" id="app">
  <div class="member-logout J_UserMemberLogout">
    <!-- 退出页面 -->
    <a href="/front/page/shop.html" class="btn-open ml3 gw-bg weight"
       style="display: block;margin-left: 28px" target="_parent">购物车</a>
    <a href="/front/page/orderManage.html" class="btn-open ml3 gw-bg weight"
       style="display: block" target="_parent">订单详情</a>
    <a href="/front/index.html" class="btn-login ml1 gw-bg weight" @click="logout()" target="_parent">退出</a>
  </div>
  <div class="member-login J_UserMemberLogin"></div>
</div>
</body>
<script src="/front/plugins/vue/vue.js"></script>
<!-- 引入组件库 -->
<script src="/front/plugins/element-ui/index.js"></script>
<!-- 引入axios -->
<script src="/front/plugins/axios/axios.min.js"></script>
<script src="/front/js/request.js"></script>
<script src="/front/js/common.js"></script>
<script src="/front/api/index.js"></script>
<script>
    new Vue({
        el: "#app",
        data() {
            return {
                userInfo: '',
            }
        },
        mounted: function () {
            this.userInfo = window.localStorage.getItem('userInfo')
            if (this.userInfo != null)
                this.userName = JSON.parse(this.userInfo).username
        },
        methods: {
            async logout() {
                window.localStorage.removeItem('userInfo')
            },
            async jumpToShoppingCart() {
                if (this.userInfo == null)
                    parent.$message.error('请先登录！')
                else
                    parent.window.location.href = '/front/page/shop.html'

            }
        }
    })
</script>
</html>